ERROR

You installed the standalone Coppermine into your Nuke portal.
". "Please download and install a CPG Port: CPG for PostNuke OR CPG for PHPnuke"; die(); } // end check } error_reporting (E_ALL ^ E_NOTICE); require('include/sql_parse.php'); // ---------------------------- TEST PREREQUIRED --------------------------- // function test_fs() { global $errors, $DFLT; // include must be writable to create config file if (! is_dir($DFLT['cfg_d'])) { $errors .= "

A subdirectory called '{$DFLT['cfg_d']}' should normally exist in the directory where you uploaded Coppermine. The installer can't find this directory. Check that you have uploaded all Coppermine files to your server.

"; } elseif (! is_writable($DFLT['cfg_d'])) { $errors .= "

The '{$DFLT['cfg_d']}' directory (located in the directory where you uploaded Coppermine) should be writable in order to save your configuration. Use your FTP program to change its mode to 777.

"; } // albums must be writable to upload pictures if (! is_dir($DFLT['alb_d'])) { $errors .= "

A subdirectory called '{$DFLT['alb_d']}' should normally exist in the directory where you uploaded Coppermine. The installer can't find this directory. Check that you have uploaded all Coppermine files to your server.

"; } elseif (! is_writable($DFLT['alb_d'])) { $errors .= "

The '{$DFLT['alb_d']}' directory (located in the directory where you uploaded Coppermine) should be writable in order to allow pictures upload. Use your FTP program to change its mode to 777.

"; } // userpics must be writable to upload pictures if (! is_dir("{$DFLT['alb_d']}/{$DFLT['upl_d']}")) { $errors .= "

A subdirectory called '{$DFLT['upl_d']}' should normally exist in the 'albums' directory. The installer can't find this directory. Check that you have uploaded all Coppermine files to your server.

"; } elseif (! is_writable("{$DFLT['alb_d']}/{$DFLT['upl_d']}")) { $errors .= "

The '{$DFLT['upl_d']}' directory (located in the 'albums' directory on your server) should be writable in order to allow pictures upload. Use your FTP program to change its mode to 777.

"; } // edit must be writable to edit pictures if (! is_dir("{$DFLT['alb_d']}/{$DFLT['edit_d']}")) { $errors .= "

A subdirectory called '{$DFLT['edit_d']}' should normally exist in the 'albums' directory. The installer can't find this directory. Check that you have uploaded all Coppermine files to your server.

"; } elseif (! is_writable("{$DFLT['alb_d']}/{$DFLT['edit_d']}")) { $errors .= "

The '{$DFLT['edit_d']}' directory (located in the 'albums' directory on your server) should be writable in order to allow pictures upload. Use your FTP program to change its mode to 777.

"; } // sql directory must exist if (! is_dir("{$DFLT['sql_d']}")) { $errors .= "

A subdirectory called '{$DFLT['sql_d']}' should normally exist in the directory where you uploaded Coppermine. The installer can't find this directory. Check that you have uploaded all Coppermine files to your server.

"; } } // ----------------------------- TEST FUNCTIONS ---------------------------- // function test_sql_connection() { global $errors, $HTTP_POST_VARS; if (!function_exists('mysql_connect')) { $errors .= "

PHP does not have MySQL support enabled.

"; } elseif (! $connect_id = @mysql_connect($HTTP_POST_VARS['dbserver'], $HTTP_POST_VARS['dbuser'], $HTTP_POST_VARS['dbpass'])) { $errors .= "

Could not create a mySQL connection, please check the SQL values entered

MySQL error was : " . mysql_error() . "

"; } elseif (! mysql_select_db($HTTP_POST_VARS['dbname'], $connect_id)) { $errors .= "

mySQL could not locate a database called '{$HTTP_POST_VARS['dbname']}' please check the value entered for this

"; } } function test_admin_login() { global $errors, $HTTP_POST_VARS; if ($HTTP_POST_VARS['admin_username'] == '' || $HTTP_POST_VARS['admin_password'] == '') $errors .= "

It is much better for you to provide a 'username' and a 'password' for the admin.

"; if (!preg_match('/\A\w*\Z/', $HTTP_POST_VARS['admin_username']) || !preg_match('/\A\w*\Z/', $HTTP_POST_VARS['admin_password'])) $errors .= "

Admin username and password must only contain alphanumeric characters.

"; } function test_im() { global $errors, $HTTP_POST_VARS, $DFLT, $im_installed; $im_installed = false; if ($HTTP_POST_VARS['impath'] != '') { if (!preg_match('|/\Z|', $HTTP_POST_VARS['impath'])) $HTTP_POST_VARS['impath'] .= '/'; if (!is_dir($HTTP_POST_VARS['impath'])) { $errors .= "

The installer can not find the '{$HTTP_POST_VARS['impath']}' directory you have specified for ImageMagick or it does not have permission to access it. Check that your typing is correct and that you have access to the specified directory.

"; } elseif (preg_match('/ /', $HTTP_POST_VARS['impath'])) { $errors .= "

The path you have entered for ImageMagick ('{$HTTP_POST_VARS['impath']}') contains at least one space. This will cause problems in the script.

You must move ImageMagick to another directory.

"; } elseif (!file_exists($HTTP_POST_VARS['impath'] . 'convert') && !file_exists($HTTP_POST_VARS['impath'] . 'convert.exe')) { $errors .= "

The installer can not find the 'convert' or 'convert.exe' ImageMagick program in directory '{$HTTP_POST_VARS['impath']}'. Check that you have entered the correct directory name.

"; } else { $output = array(); $tst_image = "{$DFLT['alb_d']}/{$DFLT['upl_d']}/im.gif"; exec ("{$HTTP_POST_VARS['impath']}convert images/nopic.jpg $tst_image", $output, $result); $size = getimagesize($tst_image); unlink($tst_image); $im_installed = ($size[2] == 1); if (!$im_installed) $errors .= "

The installer found the ImageMagick 'convert' program in '{$HTTP_POST_VARS['impath']}', however it can't be executed by the script.

You may consider using GD instead of ImageMagick.

"; if ($result && count($output)) { $errors .= "The convert program said:
";
                foreach($output as $line) $errors .= htmlspecialchars($line);
                $errors .= "


"; } } } return $im_installed; } // Test is safe_mode is misconfigured function test_silly_safe_mode() { global $DFLT; $test_file = "{$DFLT['alb_d']}/{$DFLT['upl_d']}/dummy/dummy.txt"; @mkdir(dirname($test_file), 0755); $fd = @fopen($test_file, 'w'); if (!$fd) { @rmdir(dirname($test_file)); return true; } fclose($fd); @unlink($test_file); @rmdir(dirname($test_file)); } // -------------------------- DETECTION FUNCTIONS -------------------------- // // What package is available for image manipulations function detect_img_package() { global $errors, $notes, $HTTP_POST_VARS, $DFLT, $im_installed; $no_img_package_detected = false; $tst_image = "{$DFLT['alb_d']}/{$DFLT['upl_d']}/gd1.jpg"; $size = @getimagesize($tst_image); @unlink($tst_image); $gd1_installed = ($size[2] == 2); $tst_image = "{$DFLT['alb_d']}/{$DFLT['upl_d']}/gd2.jpg"; $size = @getimagesize($tst_image); @unlink($tst_image); $gd2_installed = ($size[2] == 2); if ($im_installed) { $HTTP_POST_VARS['thumb_method'] = 'im'; } elseif ($gd2_installed) { $HTTP_POST_VARS['thumb_method'] = 'gd2'; } elseif ($gd1_installed) { $HTTP_POST_VARS['thumb_method'] = 'gd1'; } else { $HTTP_POST_VARS['thumb_method'] = 'gd2'; $no_img_package_detected = true; $notes .= "

Your installation of PHP does not seem to include the 'GD' graphic library extension and you have not indicated that you want to use ImageMagick. Coppermine has been configured to use GD2 because the automatic GD detection sometimes fail. If GD is installed on your system, the script should work else you will need to install ImageMagick.

"; } if (!$no_img_package_detected) $notes .= "

Your server supports the following image package(s): " . ($im_installed ? ' ImageMagick (im),':'') . ($gd1_installed ? ' GD Library version 1.x (gd1),':'') . ($gd2_installed ? ' GD Library version 2.x (gd2),':'') . " the installer selected '" . $HTTP_POST_VARS['thumb_method'] . "'."; if ($HTTP_POST_VARS['thumb_method'] == 'gd1' || $HTTP_POST_VARS['thumb_method'] == 'gd2') $notes .= "

Important : the GD graphic library supports only JPEG and PNG images. The script will not be able to create thumbnails for GIF images. If you want the script to create thumbnails for GIF images, you need to use ImageMagick."; } // ------------------------- HTML OUTPUT FUNCTIONS ------------------------- // function html_header() { ?> Coppermine - Installation

The installer is locked

• • • ERROR • • •
The installer has already been run successfuly once and is now locked.

If you want to run the installer again, you first need to delete the '' file that was created in the directory where you put Coppermine. You can do this with any FTP program.



Welcome to Coppermine installation

• • • ERROR • • •
Before you continue with Coppermine installation, there are some problems that need to be fixed.

Once you are done, hit the "Try again" button.



Welcome to Coppermine installation

• • • ERROR • • •
The following errors were encountered and need to be corrected first:

Your admin account
This section requires information to create your administration account. Use only alphanumeric characters. Enter the data carefully !
Username '>
Password '>
Your MySQL configuration
This section requires information on how to access your MySQL database. If you don't know how to fill them, check with your webhost support.
MySQL Host
(localhost is usually OK)
'>
MySQL Database Name '>
MySQL Username '>
MySQL Password '>
MySQL table prefix
(default value is OK; do not use dots!)
'>
ImageMagick
Coppermine can use the ImageMagick 'convert' program to create thumbnails. Quality of images produced by ImageMagick is superior to GD1 but equivalent to GD2.

If ImageMagick is installed on your system and you want to use it, you need to input the full path to the 'convert' program below. On Windows the path should look like 'c:/ImageMagick/' (use / not \ in the path) and should not contain any space, on Unix is it something like '/usr/bin/X11/'.
ImageMagick path '>



Installation completed

Coppermine is now properly configured and ready to roll.

Login using the information you provided for your admin account. Do not hit back, do not re-submit the installer form!